//
//  SCCamera.h
//  OCRDemo
//
//  Created by 党帅 on 2019/6/4.
//  Copyright © 2019 党帅. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <AVFoundation/AVFoundation.h>

@protocol SCVinCameraDelegate <NSObject>

- (void)processVideoSampleBuffer:(CMSampleBufferRef _Nullable )sampleBuffer;

- (void)processImage:(UIImage *_Nullable)image;

- (BOOL)shouldGenerateImage;
@end


NS_ASSUME_NONNULL_BEGIN

@interface SCVinCamera : NSObject

//+ (instancetype)sharedInstance;

@property (nonatomic, weak) id<SCVinCameraDelegate> delegate;

@property (nonatomic, assign) CGPoint cropPoint;    // value in (0,1)
@property (nonatomic, assign) CGSize  cropSize;     // value in (0,1)

- (void)showInView:(UIView *)view;

- (void)showInView:(UIView *)view belowLayer:(CALayer *)layer;

- (void)torchSwitch;

- (void)start;

- (void)stop;


@end

NS_ASSUME_NONNULL_END
